home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_include / LINUX / SUNRPC / DEBUG.H < prev    next >
C/C++ Source or Header  |  1999-09-17  |  2KB  |  92 lines

  1. /*
  2.  * linux/include/linux/sunrpc/debug.h
  3.  *
  4.  * Debugging support for sunrpc module
  5.  *
  6.  * Copyright (C) 1996, Olaf Kirch <okir@monad.swb.de>
  7.  */
  8.  
  9. #ifndef _LINUX_SUNRPC_DEBUG_H_
  10. #define _LINUX_SUNRPC_DEBUG_H_
  11.  
  12. #include <linux/timer.h>
  13. #include <linux/tqueue.h>
  14.  
  15. /*
  16.  * Enable RPC debugging/profiling.
  17.  */
  18. #define  RPC_DEBUG
  19. /* #define  RPC_PROFILE */
  20.  
  21. /*
  22.  * RPC debug facilities
  23.  */
  24. #define RPCDBG_XPRT        0x0001
  25. #define RPCDBG_CALL        0x0002
  26. #define RPCDBG_DEBUG        0x0004
  27. #define RPCDBG_NFS        0x0008
  28. #define RPCDBG_AUTH        0x0010
  29. #define RPCDBG_PMAP        0x0020
  30. #define RPCDBG_SCHED        0x0040
  31. #define RPCDBG_SVCSOCK        0x0100
  32. #define RPCDBG_SVCDSP        0x0200
  33. #define RPCDBG_MISC        0x0400
  34. #define RPCDBG_ALL        0x7fff
  35.  
  36. #ifdef __KERNEL__
  37.  
  38. /*
  39.  * Debugging macros etc
  40.  */
  41. #ifdef RPC_DEBUG
  42. extern unsigned int        rpc_debug;
  43. extern unsigned int        nfs_debug;
  44. extern unsigned int        nfsd_debug;
  45. extern unsigned int        nlm_debug;
  46. #endif
  47.  
  48. #define dprintk(args...)    dfprintk(FACILITY, ## args)
  49.  
  50. #undef ifdebug
  51. #ifdef RPC_DEBUG            
  52. # define ifdebug(fac)        if (rpc_debug & RPCDBG_##fac)
  53. # define dfprintk(fac, args...)    do { ifdebug(fac) printk(## args); } while(0)
  54. # define RPC_IFDEBUG(x)        x
  55. #else
  56. # define dfprintk(fac, args...)    do ; while (0)
  57. # define RPC_IFDEBUG(x)
  58. #endif
  59.  
  60. #ifdef RPC_PROFILE
  61. # define pprintk(args...)    printk(## args)
  62. #else
  63. # define pprintk(args...)    do ; while (0)
  64. #endif
  65.  
  66. /*
  67.  * Sysctl interface for RPC debugging
  68.  */
  69. #ifdef RPC_DEBUG
  70. void        rpc_register_sysctl(void);
  71. void        rpc_unregister_sysctl(void);
  72. #endif
  73.  
  74. #endif /* __KERNEL__ */
  75.  
  76. /*
  77.  * Declarations for the sysctl debug interface, which allows to read or
  78.  * change the debug flags for rpc, nfs, nfsd, and lockd. Since the sunrpc
  79.  * module currently registers its sysctl table dynamically, the sysctl path
  80.  * for module FOO is <CTL_SUNRPC, CTL_FOODEBUG>.
  81.  */
  82. #define CTL_SUNRPC    7249    /* arbitrary and hopefully unused */
  83.  
  84. enum {
  85.     CTL_RPCDEBUG = 1,
  86.     CTL_NFSDEBUG,
  87.     CTL_NFSDDEBUG,
  88.     CTL_NLMDEBUG,
  89. };
  90.  
  91. #endif /* _LINUX_SUNRPC_DEBUG_H_ */
  92.